Skip to content

removed not necessary bn switch decorator on nansum #20481

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2018

Conversation

asdf8601
Copy link
Contributor

Removed not necessary bottleneck_switch decorator on nansum function like nanprod.

@codecov
Copy link

codecov bot commented Mar 25, 2018

Codecov Report

Merging #20481 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #20481      +/-   ##
==========================================
- Coverage   91.85%   91.84%   -0.01%     
==========================================
  Files         152      152              
  Lines       49231    49230       -1     
==========================================
- Hits        45220    45215       -5     
- Misses       4011     4015       +4
Flag Coverage Δ
#multiple 90.23% <ø> (-0.01%) ⬇️
#single 41.83% <ø> (-0.01%) ⬇️
Impacted Files Coverage Δ
pandas/core/nanops.py 96.3% <ø> (-0.4%) ⬇️
pandas/util/testing.py 84.52% <0%> (-0.21%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4fb963b...d13ae37. Read the comment docs.

@jreback
Copy link
Contributor

jreback commented Mar 25, 2018

should also be on nansum. how did you come to change this? e.g. what broke?

@jreback jreback added Testing pandas testing functions or related to the test suite Compat pandas objects compatability with Numpy or Python functions labels Mar 25, 2018
@jreback jreback added this to the 0.23.0 milestone Mar 25, 2018
@asdf8601
Copy link
Contributor Author

oh, now I don't see it so clearly and I'm probably wrong. Nothing has been broken, I was checking the code and I noticed that bottleneck_switch seems to do nothing when the function is nansum or nanprod according to _bn_ok_dtype, I thought it would be an unnecessary call.

@jreback
Copy link
Contributor

jreback commented Mar 25, 2018

@mmngreco no it IS unecessary since 0.22 (as we compute sum/prod inside pandas only). was just wondering how you detected it.

happy to have you remove the one on nansum as well. I don't think there is a test for this that would break, but if you have something would be great.

@asdf8601
Copy link
Contributor Author

asdf8601 commented Mar 25, 2018

I have not found any test for bottleneck_switch, I understand that this would be necessary for this case. I haven't written anything yet. I will try in the next few days as I am not sure how to do it.

Copy link
Contributor

@TomAugspurger TomAugspurger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also don't think you'll find a test where this matters.

Merging later today.

@TomAugspurger TomAugspurger merged commit eb095af into pandas-dev:master Mar 29, 2018
@TomAugspurger
Copy link
Contributor

Thanks @mmngreco

javadnoorb pushed a commit to javadnoorb/pandas that referenced this pull request Mar 29, 2018
asdf8601 added a commit to asdf8601/pandas that referenced this pull request Mar 30, 2018
asdf8601 added a commit to asdf8601/pandas that referenced this pull request Mar 30, 2018
@asdf8601 asdf8601 mentioned this pull request Mar 30, 2018
4 tasks
@asdf8601 asdf8601 deleted the clean_code branch March 31, 2018 16:37
dworvos pushed a commit to dworvos/pandas that referenced this pull request Apr 2, 2018
kornilova203 pushed a commit to kornilova203/pandas that referenced this pull request Apr 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants